Zadig 文档
Zadig
教程
博客
论坛
关于
中文英文
Zadig
教程
博客
论坛
关于
Zadig v3.4
Loading...
     编辑文档
     反馈问题
     社区讨论

    本页导航

    效能洞察

    # 数据概览

    # 请求

    GET /openapi/statistics/overview
    
    1

    # 返回

    {
      "project_count": 9,    // 项目数量
      "cluster_count": 3,    // 集群数量
      "service_count": 28,   // 服务数量
      "workflow_count": 17,  // 工作流数量
      "env_count": 15,       // 环境数量
      "artifact_count": 332  // 交付物数量
    }
    
    1
    2
    3
    4
    5
    6
    7
    8

    # 构建数据统计

    # 请求

    GET /openapi/statistics/build
    
    1

    # Query

    参数名类型描述
    startDateint64以秒为单位的 Unix 时间戳,统计从时间戳当天 00:00:00 开始的数据
    endDateint64以秒为单位的 Unix 时间戳,统计到时间戳当天 23:59:59 结束的数据
    productNames[]string项目列表

    注意

    若指定查询时间区间,startDate 和 endDate 需同时传递。

    # 返回

    {
      "total": 10,                    // 总成功次数
      "success": 10,                  // 总构建次数
      "data": [                       // 指定时间区间内,每天的构建数据详情
        {
          "date": "2022-08-01",       // 构建统计日期
          "success": 4,               // 当日成功次数
          "failure": 0,               // 当日失败次数
          "total": 4                  // 当日失败次数
        },
        {
          "date": "2022-08-02",
          "success": 3,
          "failure": 0,
          "total": 3
        },
        ...
      ]
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19

    # 部署数据统计

    # 请求

    GET /openapi/statistics/deploy
    
    1

    # Query

    参数名类型描述
    startDateint64以秒为单位的 Unix 时间戳,统计从时间戳当天 00:00:00 开始的数据
    endDateint64以秒为单位的 Unix 时间戳,统计到时间戳当天 23:59:59 结束的数据
    productNames[]string项目列表

    注意

    若指定查询时间区间,startDate 和 endDate 需同时传递。

    # 返回

    {
      "success": 8,             // 总成功次数
      "total":   11,            // 总部署次数
      "data": [                 // 指定时间区间内,每天的部署数据详情
        {
          "date": "2022-08-10", // 部署统计日期
          "failure": 1,         // 当日失败次数
          "success": 1,         // 当日成功次数
          "total":   2,         // 当日部署次数
        },
        {
          "date": "2022-08-11",
          "failure": 2,
          "success": 7,
          "total":   9,
        }
        ...
      ]
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19

    # 测试数据统计

    # 请求

    GET /openapi/statistics/test
    
    1

    # Query

    参数名类型描述
    startDateint64以秒为单位的 Unix 时间戳,统计从时间戳当天 00:00:00 开始的数据
    endDateint64以秒为单位的 Unix 时间戳,统计到时间戳当天 23:59:59 结束的数据
    productNames[]string项目列表

    注意

    若指定查询时间区间,startDate 和 endDate 需同时传递。

    # 返回

    {
      "case_count": 24,             // 用例数量
      "exec_count": 13,             // 统计期间执行次数
      "success_count": 13,          // 统计期间成功数量
      "average_runtime": 10,        // 统计期间测试任务平均执行时长
      "data": [                     // 指定时间区间内,每周的测试数据详情
        {
          "date": "2022-08-11",     // 以周为维度的统计日期
          "success_count": 0,       // 以周为维度的成功次数
          "timeout_count": 0,       // 以周为维度的超时次数
          "failed_count": 0         // 以周为维度的失败次数
        },
        {
          "date": "2022-08-04",
          "success_count": 2,
          "timeout_count": 0,
          "failed_count": 0
        },
        ...
      ]
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21

    # 生产环境发布数据统计

    # 请求

    GET /openapi/statistics/v2/release
    
    1

    # Query

    参数名类型描述
    start_timeint64以秒为单位的 Unix 时间戳
    end_timeint64以秒为单位的 Unix 时间戳
    project_namestring项目标识

    # 返回

    {
      "total": 10,                           // 生产环境发布次数
      "success_count": 9,                    // 生产环境发布成功次数
      "daily_stat": [                        // 时间段内每日统计
        {
          "date": "2023-05-15",                // 日期
          "total": 10,                         // 当日发布次数
          "success_count": 9,                  // 当日发布成功次数
          "fail_count": 1,                     // 当日发布失败次数
        }
        ...
      ]
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13

    # 获取回滚数据

    # 请求

    GET /openapi/statistics/v2/rollback/detail
    
    1

    # Query

    参数名类型描述必填
    projectKeystring项目标识否
    envNamestring环境名称否
    serviceNamestring服务名称否
    startTimeint开始时间是
    endTimeint结束时间是
    pageNumint分页当前页数是
    pageSizeint分页每页数量是

    # 返回

    {
        "total": 1,                           //回滚总数
        "data": [
            {
                "project_key": "yaml",        //项目标识
                "env_name": "prod",           //环境名称
                "env_type": "zadig",          //环境类型
                "production": true,           //是否生产环境
                "operation_type": "zadig",    //操作类型
                "service_name": "service2",   //服务名称
                "service_type": "k8s",        //服务类型
                "origin_service": {           //回滚前服务信息
                    "service_name": "service2",
                    "release_name": "",       //release名称,用于helm chart类型服务
                    "containers": [           //容器镜像信息
                        {
                            "name": "service2", //容器名称
                            "type": "",         //区分是否是 initContainer
                            "image": "koderover.tencentcloudcr.com/test/service2:20240830123413-8-main",  //完整的镜像地址
                            "image_name": "service2"  //镜像名称
                        }
                    ],
                    "rendered_yaml": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  creationTimestamp: null\n  labels:\n    app.kubernetes.io/instance: service2\n    app.kubernetes.io/name: yaml\n  name: service2\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app.kubernetes.io/instance: service2\n      app.kubernetes.io/name: yaml\n  strategy: {}\n  template:\n    metadata:\n      creationTimestamp: null\n      labels:\n        app.kubernetes.io/instance: service2\n        app.kubernetes.io/name: yaml\n    spec:\n      containers:\n      - command:\n        - /workspace/service2\n        image: koderover.tencentcloudcr.com/test/service2:20240830123413-8-main\n        imagePullPolicy: Always\n        name: service2\n        ports:\n        - containerPort: 20222\n          protocol: TCP\n        resources: {}\nstatus: {}\n\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: service2\n  labels:\n    app.kubernetes.io/name: yaml\n    app.kubernetes.io/instance: service2\nspec:\n  type: NodePort\n  ports:\n    - protocol: TCP\n      port: 20222\n      targetPort: 20222\n",
                    "values_yaml": "",              //values内容,仅用于helm和helm chart类型服务
                    "override_values": "",          //覆盖的键值对,内容格式为json,仅用于helm和helm chart类型服务
                    "update_time": 1725518692       //服务更新时间
                },
                "update_service": {                 //回滚后服务信息
                    "service_name": "service2",     //服务名称
                    "release_name": "",             //release名称,用于helm chart类型服务
                    "containers": [
                        {
                            "name": "service2",
                            "type": "",
                            "image": "koderover.tencentcloudcr.com/test/service2:20240621003703-261-main",
                            "image_name": "service2"
                        }
                    ],
                    "rendered_yaml": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  creationTimestamp: null\n  labels:\n    app.kubernetes.io/instance: service2\n    app.kubernetes.io/name: yaml\n  name: service2\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app.kubernetes.io/instance: service2\n      app.kubernetes.io/name: yaml\n  strategy: {}\n  template:\n    metadata:\n      creationTimestamp: null\n      labels:\n        app.kubernetes.io/instance: service2\n        app.kubernetes.io/name: yaml\n    spec:\n      containers:\n      - command:\n        - /workspace/service2\n        image: koderover.tencentcloudcr.com/test/service2:20240621003703-261-main\n        imagePullPolicy: Always\n        name: service2\n        ports:\n        - containerPort: 20222\n          protocol: TCP\n        resources: {}\nstatus: {}\n\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: service2\n  labels:\n    app.kubernetes.io/name: yaml\n    app.kubernetes.io/instance: service2\nspec:\n  type: NodePort\n  ports:\n    - protocol: TCP\n      port: 20222\n      targetPort: 20222\n",    //渲染后的yaml,仅用于k8s类型服务
                    "values_yaml": "",             //values内容,仅用于helm和helm chart类型服务
                    "override_values": "",         //覆盖的键值对,内容格式为json,仅用于helm和helm chart类型服务
                    "update_time": 1734491054
                },
                "create_by": {                     //回滚执行人信息
                    "uid": "89358827-5137-11ee-b0c5-56d5fd1dd39e", //用户 ID
                    "account": "admin",            //用户账号 (登陆名)
                    "name": "admin",               //用户名称 (昵称)
                    "identity_type": "system"      //用户身份类型
                },
                "create_time": 1734491054          //回滚时间
            }
        ]
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53

    ← 镜像仓库权限→

    资源
    教程
    论坛
    博客
    公司
    关于
    客户故事
    加入我们
    联系我们
    微信扫一扫
    hello@koderover.com

    © 2026 筑栈(上海)信息技术有限公司 沪 ICP 备 19000177 号 - 1

    •  跟随系统
    •  浅色模式
    •  深色模式
    •  阅读模式